CC = gcc

all: circle rect client

circle: circle.c lib_circle.o
	$(CC) -o $@ $^ -lpthread

rect: rect.c lib_rect.o
	$(CC) -o $@ $^

client: client.c client.o http_http.o lib_zipmap.o
	$(CC) -o $@ $^

%.o: ../src/%.c
	$(CC) -o $@ -c $<

lib_%.o: ../src/lib/%.c
	$(CC) -o $@ -c $<

http_%.o: ../src/http/%.c
	$(CC) -o $@ -c $<

clean:
	rm -f *.o
	rm -f circle rect client

.PHONY: clean
